<?php
// No direct access.
if (! defined('INCOURSE'))
    return;
    /*
 * else if (! isset($courses)) { @include_once dirname(__DIR__) .
 * '/coursesModel.php'; if (! isset($courses) || empty($courses)) { echo
 * 'Missing Content / Ελλειπές περιεχόμενο'; return; } }
 */

$categories = new Categories();

global $coursesMenu;
$count = count($coursesMenu);
$i=0;
foreach ($coursesMenu as $course)
:
$i++;
    ?>
<div class="col_w600 <?php echo $i == $count? 'col_w600_last':'';?>">
  <a
    href="<?php echo $categories->getCategoryLink($course['category']).$course['page']; ?>"><h2><?php echo $course['title']; ?></h2>
  </a>
  <p><?php echo $course['description']; ?></p>
  <p>
  <?php

    echo (isset($isMain) && $isMain) ? sprintf('<a href="%s">%s</a><br />',
            $categories->getCategoryLink($course['category']),
            $categories->getCategoryDisplayableName($course['category'])) : '';
    ?>
    Μάθετε <a
      href="<?php echo $categories->getCategoryLink($course['category']).$course['page']; ?>">περισσότερα..</a>
  </p>
</div>
<?php endforeach; ?>
<!-- <div class='col_w600 col_w600_last'></div> -->
<div class="cleaner"></div>